package aishua.com.mytestapplist.utils;

/**
 * Created by aishua on 2017/7/5.
 */



import java.io.Serializable;
import java.nio.charset.Charset;


public interface CommonConstants {
    public static final String ACCESS_KEY_NAME = "ACCESS_KEY";
    public static final String ACCESS_SECRET_NAME = "ACCESS_SECRET";
    public static final String ACCOUNT_PREFS_NAME = "prefs";
    public static final String APPS_DIR = "Apps";
    public static final String ATTACHMENTS_FOLDER_SUBPATH_1PASS = "/a/default/files";
    public static final String ATTACHMENT_DIR = "/attachments";
    public static final String B5_PASSWORD_CHANGE = "com.agilebits.onepassword.b5passwordchange";
    public static final int B5_REFRESH_LIST_VIEW_RECORDS_COUNT = 20;
    public static final int B5_UPLOAD_BATCH_SIZE = 100;
    public static final String BROADCAST_ASK_FOR_INPUT_SYNC = "com.agilebits.onepassword.services.ASK_FOR_INPUT_WIFI_SYNC";
    public static final String BROADCAST_B5_REFRESH_VIEW = "com.agilebits.onepassword.services.REFRESH_B5_VIEW";
    public static final String BROADCAST_B5_SYNC_STARTED = "com.agilebits.onepassword.services.B5_SYNC_STARTED";
    public static final String BROADCAST_B5_SYNC_STOPPED = "com.agilebits.onepassword.services.B5_SYNC_STOPPED";
    public static final String BROADCAST_CLOSE_QA_WINDOW = "com.agilebits.onepassword.services.BROADCAST_CLOSE_QA_WINDOW";
    public static final String BROADCAST_EXIT_APP = "com.agilebits.onepassword.services.EXIT_APP";
    public static final String BROADCAST_LOAD_SETTINGS_FRAG = "com.agilebits.onepassword.services.LOAD_SETTINGS_FRAG";
    public static final String BROADCAST_REFRESH_VIEW = "com.agilebits.onepassword.services.REFRESH_VIEW";
    public static final String BROADCAST_RELOAD_ITEM_FRAG = "com.agilebits.onepassword.services.RELOAD_ITEM_FRAG";
    public static final String BROADCAST_REPLACE_FRAG = "com.agilebits.onepassword.services.REPLACE_FRAGMENT";
    public static final String BROADCAST_REQUIRED_VALUE_PROVIDED = "com.agilebits.onepassword.services.MASTER_PWD_PROVIDED";
    public static final String BROADCAST_SET_CONTROLS_MENU = "com.agilebits.onepassword.services.BROADCAST_SET_CONTROLS_MENU";
    public static final String BROADCAST_SHOW_EXTENDED_FLDS = "com.agilebits.onepassword.services.BROADCAST_SHOW_EXTENDED_FLDS";
    public static final String BROADCAST_SYNC_STARTED = "com.agilebits.onepassword.services.SYNC_STARTED";
    public static final String BROADCAST_SYNC_STOPPED = "com.agilebits.onepassword.services.SYNC_STOPPED";
    public static final String CONSUMER_KEY = "bszlgqqpf1yne5x";
    public static final String CONSUMER_SECRET = "nj0gjeimk21i71p";
    public static final String CONTENTS_FILE = "contents.js";
    public static final String CREATE_NEW_KEYCHAIN = "CREATE_NEW_KEYCHAIN";
    public static final String DATAFILE_DEFAULT_1PASS = "1Password.agilekeychain";
    public static final String DATAFILE_DEFAULT_OPV = "1Password.opvault";
    public static final String DATAFILE_FOLDER_NAME = "1Password";
    public static final String DATAFILE_FOLDER_NAME_OPV = "OPVSYNC";
    public static final String DATA_DEFAULT_FOLDER_SUBPATH_1PASS = "/data/default";
    public static final String DATA_FILE_EXT_1PASS = ".1password";
    public static final int DELAY_MSEC_DEFAULT = 600;
    public static final String DIAGNOSTIC_REPORT_FILENAME_PREFIX = "Android_Diagnostic_Report";
    public static final String DROPBOX_SETTINGS_FILE = ".ws.agile.1Password.settings";
    public static final String DR_SYNC_LOG_FILENAME = "LAST_DR_SYNC_LOG";
    public static final String ENC_KEYS_1PASS = "encryptionKeys.js";
    public static final String FOLDERS_BAND = "FOLDERS";
    public static final String FOLDERS_OPV = "folders.js";
    public static final String FRAG_TO_SHOW = "FRAG_TO_SHOW";
    public static final String HINT = "HINT";
    public static final String HINT_FILENAME = ".password.hint";
    public static final String HINT_FILENAME_CPY = ".passwordCPY.hint";
    public static final String ICONS_DIR = "/icons";
    public static final String IGNORE_LOCKING = "IGNORE_LOCKING";
    public static final String INITIAL_DATA_LOAD = "INITIAL_DATA_LOAD";
    public static final String INSTALLATION_FILE_NAME = "INSTALLATION";
    public static final String IS_ALL_VAULTS = "IS_ALL_VAULTS";
    public static final int ITERACTIONS_COMM = 1000;
    public static final String KEYCHAIN_DEFAULT_PATH = "/1Password/1Password.agilekeychain";
    public static final String KEYCHAIN_DEFAULT_PATH_FOR_CREATE_NEW = "/Apps/1Password/1Password.agilekeychain";
    public static final String KEYCHAIN_DEFAULT_PATH_OPV = "/OPVSYNC/1Password.opvault";
    public static final String KEYCHAIN_FILE_EXT_1PASS = ".agilekeychain";
    public static final String KEYCHAIN_FILE_EXT_OPV = ".opvault";
    public static final String KEYCHAIN_FILE_LOCATION = "keychainFileLocation";
    public static final int KEYHOLE_ANIMATION_MSEC = 500;
    public static final int KILOBYTE = 1024;
    public static final String LOCAL_PATH_PREFIX = "/storage/emulated/0/";
    public static final int MAIL_SENDING_ACTIVITY_CODE = 2;
    public static final String MASTER_PWD = "MASTER_PWD";
    public static final int MAX_ATTACHMENT_SIZE_BYTES = 5242880;
    public static final int MAX_ATTACHMENT_SIZE_INTEL_PROCESSOR_BYTES = 1048576;
    public static final int MAX_DOWNLOADED_ITEM_SIZE_BYTES = 256000;
    public static final int MAX_DR_SYNC_LOG_FILE_SIZE = 51200;
    public static final int MEGABYTE = 1048576;
    public static final int MIN_DOWNLOADED_ITEM_SIZE_BYTES = 3;
    public static final long MSEC_FOR_TWELVE_HOURS_PLUS_ONE_MIN = 43260000;
    public static final long MSEC_IN_DAY = 86400000;
    public static final String NEW_ITEM_TOKEN = "NEW_ITEM_TOKEN";
    public static final String NEW_KEYCHAIN_PATH = "NEW_KEYCHAIN_PATH";
    public static final int NO_OF_ITERATIONS_MASTER_KEY = 10000;
    public static final int NO_OF_ITERATIONS_NEW_EXTERNAL_KEY = 50000;
    public static final String PASSWORD_KEYS_FILE = "1password.keys";
    public static final String PATTERN_DETAILED_TIMESTAMP = "dd-MM-yyyy hh:mm:ss a zz";
    public static final String PATTERN_LOG_FILE_HEADER = "dd-MM hh:mm:ss";
    public static final String PATTERN_LOG_FILE_LINE_TIMESTAMP = "[mm:ss] ";
    public static final String PATTERN_LOG_FILE_NAME = "MMMdd hh_mm_ss";
    public static final String PROFILE_OPV = "profile.js";
    public static final int REQUEST_CODE_FILE_BROWSER_ACTIVITY = 887;
    public static final int REQUEST_CODE_IGNORE_LOCKING_ACTIVITY = 888;
    public static final int REQUEST_CODE_ITEM_DETAIL_ACTIVITY = 2;
    public static final int REQUEST_CODE_LOCK_SCREEN_ACTIVITY = 10;
    public static final int REQUEST_CODE_SETUP_EXISTING_USER_ACTIVITY = 12;
    public static final int REQUEST_PERMISSION_CAMERA = 2;
    public static final int REQUEST_PERMISSION_WRITE_EXTERNAL_STORAGE = 1;
    public static final String REQUIRE_PWD_VERIFICATION = "com.agilebits.onepassword.requirepwdverification";
    public static final int RESULT_CODE_FINISH_ACTIVITY = 16;
    public static final String SECURITY_LEVEL_SL3 = "SL3";
    public static final String SECURITY_LEVEL_SL5 = "SL5";
    public static final String SELECTED_CATEGORY = "SELECTED_CATEGORY";
    public static final String SELECTED_ITEM = "SELECTED_ITEM";
    public static final String SELECTED_ITEM_UUID = "SELECTED_ITEM_UUID";
    public static final String SELECTED_LEFT_MENU_ITEM = "SELECTED_LEFT_MENU_ITEM";
    public static final String SELECTED_URL = "SELECTED_URL";
    public static final int SETUP_NEWDB_ACTIVITY = 11;
    public static final String SHOW_EXTENDED_FIELDS = "SHOW_EXTENDED_FIELDS";
    public static final String SHOW_ITEM_REQUEST = "SHOW_ITEM_REQUEST";
    public static final String SYNC_ACTION_FINISH = "SYNC_ACTION_FINISH";
    public static final String SYNC_DATA = "SYNC_DATA";
    public static final int SYNC_NOTIFICATION = 999;
    public static final String SYNC_STATUS_ENUM = "SYNC_STATUS_ENUM";
    public static final String TEMP_DIR = "/temp";
    public static final String TOKEN_ASK_FOR_MERGE = "_%ASK_FOR_MERGE_TOKEN%_";
    public static final String TOKEN_CONFIRM_MERGE = "_%TOKEN_CONFIRM_MERGE%_";
    public static final String TOKEN_PWD = "_%PASSWORD_TOKEN%_";
    public static final String TOKEN_PWD_CANCEL = "_%PWD_CANCEL_TOKEN%_";
    public static final String TOKEN_PWD_VALIDATED = "_%PASSWORD_VALIDATED_TOKEN%_";
    public static final String TOKEN_REJECT_MERGE = "_%TOKEN_REJECT_MERGE%_";
    public static final String TOKEN_RESOLUTION_FAILED = "_%FALIED_RESOLUTION%_";
    public static final String TOKEN_RESOLUTION_FAILED_ERR_CODE = "_%FALIED_RESOLUTION%_ERR_CODE%_";
    public static final String TOKEN_RESOLUTION_SUCCESS = "_%SERVICE_RESOLVED%_";
    public static final String TOKEN_SECRET = "_%SECRET_TOKEN%_";
    public static final String TOKEN_SECRET_CANCEL = "_%SECRET_CANCEL_TOKEN%_";
    public static final String TOKEN_TASK_CANCEL = "_%TOKEN_TASK_CANCEL%_";
    public static final String TOKEN_TASK_CONTINUE = "_%TOKEN_TASK_CONTINUE%_";
    public static final long TOTP_COUNTDOWN_REFRESH_PERIOD = 100;
    public static final int TOTP_DEFAULT_INTERVAL = 30;
    public static final int TOTP_DEFAULT_PIN_LENGTH = 6;
    public static final int UNKNOWN_VALUE = -999;
    public static final String USER_SYNC_LOG_FILENAME = "LAST_USER_SYNC_LOG";
    public static final String USE_ALPHA_MODE = "com.agilebits.onepassword.usealphamode";
    public static final boolean USE_AUTOLOCK_DEBUG_TIME = false;

    public static final String VAULT_UUID = "VAULT_UUID";
    public static final String VERSION_CODE = "VERSION_CODE";
    public static final String WI_FI_SERVICE_TYPE = "_1password4._tcp.";
    public static final byte[] ZERO_SAULT = new byte[]{(byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0, (byte) 0};

    public enum ACCT_STATES {
        ACTIVE("A"),
        SUSPENDED("S"),
        DELETED("D");

        private String mValue;

        private ACCT_STATES(String value) {
            this.mValue = value;
        }

        public String getValue() {
            return this.mValue;
        }
    }

    public enum HTTP_REQUEST_TYPES {
        GET,
        POST,
        PATCH
    }

    public enum KeychainLocationEnum implements Serializable {
        KEYCHAIN_LOCALLY,
        KEYCHAIN_DROPBOX,
        KEYCHAIN_UNKNOWN,
        KEYCHAIN_WIFI
    }

    public enum LaunchTypeEnum implements Serializable {
        ADD,
        EDIT,
        VIEW,
        FILLING,
        B5_UPDATE_LOGIN
    }

    public enum PopupMenuEnum {
        LOGIN,
        COPY,
        REVEAL,
        EMAIL,
        PHONE,
        LARGETYPE
    }

    public enum SettingsCategoryEnum {
        SECURITY,
        SYNC,
        DISPLAY,
        APP_INFO,
        ADVANCED
    }

    public enum SetupStatus implements Serializable {
        STATUS_CHOOSE_NEW_EXISTING_USER,
        STATUS_CHOOSE_DROPBOX_LOCAL
    }


    public enum SyncStatusEnum {
        SUCCESS,
        FAILED,
        INVALID_LOGIN,
        INVALID_CREDENTIALS,
        RECOVERABLE,
        ENCRYPTION_KEY_CHANGED,
        KNOWN_ERROR,
        INVALID_SECRET,
        CANCELLED,
        WI_FI_SERVER_ERROR,
        B5_ACCT_DELETED,
        B5_ACCT_SUSPENDED,
        B5_FAILED_DIFFERENT_USER,
        B5_ACCT_EMAIL_CHANGED
    }

    public enum SyncType implements Serializable {
        SYNC_ALL,
        SYNC_PRIMARY_VAULT_ONLY,
        SYNC_ALL_ACCOUNTS,
        SYNC_ONE_ACCOUNT
    }

    public enum ValidationResultEnum {
        VALIDATION_OK,
        VALIDATION_FAILED,
        PWD_CHANGED
    }
}